﻿@{
    ViewBag.Title = "SendMail";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var formats = ViewData["formats"] as List<SmallJob.Model.EmailFormat>;
}

<h2>SendMail</h2>
<span>Gửi bởi format mới hoặc chọn format đã có.</span>
@using (Html.BeginForm("SaveSendMail", "Email", FormMethod.Post))
{
    <input type="text" id="txtTo" name="txtTo" placeholder="Message To" />
    <input type="text" id="txtSubject" name="txtSubject" placeholder="Subject" />
    <input type="text" name="dictionary" placeholder="key1:value1;key2:value2" />
    <select name="selectformat">
        <option value="0" selected="selected">This Edit</option>
        @foreach (var item in formats)
        {
            <option value="@item.ID">@item.Title</option>
        }
    </select>
    <textarea id="txtBody" name="txtBody" rows="6" style="width: 385px; height: 300px"></textarea>
   
    <br />
    <input type="submit" value="Send" class="btn" />
}
<script src="@Url.Content("~/Content/plugin/ckeditor/ckeditor.js")"></script>
<script>
    //$(document).ready(function () {
    //    $('#txtBody').wysihtml5({
    //        "font-styles": false
    //    });
    //});

    CKEDITOR.replace('txtBody', {
        width: 700,
        allowedContent: true,
        extraPlugins: 'wysiwygarea'
    });
</script>
